import { projectsApiConfig } from '@choerodon/master';

export default ({ id = 0 }) => ({
  autoQuery: true,
  paging: true,
  transport: {
    read: (data) => ({
      ...projectsApiConfig.enableUsersPage(''),
      params: {
        ...data?.params,
      },
    }),
  },
  fields: [
    { name: 'realName', type: 'string' },
    { name: 'loginName', type: 'string' },
    { name: 'id', type: 'string', unique: true },
  ],
});
